/**
 * @author chenTeng
 */
import request from '@/utils/request'
/**
 * 创建闯关
 * @param {*} data
 */
export function insert(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/insert',
        method: 'post',
        data
    })
}
/**
 * 获取分类树
 */
export function getClassifyTree(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/learnClassify/getClassifyTree',
        method: 'post',
        data
    })
}
/**
 * 编辑考试
 * @param {*} data
 */
export function update(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/updateExam',
        method: 'post',
        data
    })
}

// 强制下发的考试修改排序
export function updateSort(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/updateSort',
        method: 'post',
        data
    })
}

/**
 * 获取分类树
 */
export function getClassifyTrees(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/learnClassify/getClassifyTree',
        method: 'post',
        data
    })
}
/**
 * 获取考试信息-用于编辑回显
 * @param {*} id
 */
export function get(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/getExam',
        method: 'post',
        data
    })
}
/**
 * 考试列表查询
 * @param {*} data
 */
export function queryPage(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/queryPage',
        method: 'post',
        data
    })
}
/**
* 启用禁用
*/
export function updateStatus(data) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/updateStart',
        method: 'post',
        data
    })
}
/**
* 删除考试
* @param {*} id
*/
export function del(id) {
    return request({
        baseURL: '/API-ENTERPRISE-BACKEND/',
        url: '/backend/examOnline/deleteByIdExam',
        method: 'get',
        params: { id }
    })
}